package cn.cnsy123.shorturls.business.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.cnsy123.shorturls.business.entity.DeptInfoQueryResultDto;
import cn.cnsy123.shorturls.business.entity.SysDeptInfo;
import cn.cnsy123.shorturls.business.entity.SysDeptZtreeInfo;

public interface SysDeptInfoMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SysDeptInfo record);

    int insertSelective(SysDeptInfo record);

    SysDeptInfo selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SysDeptInfo record);

    int updateByPrimaryKey(SysDeptInfo record);

    List<DeptInfoQueryResultDto> selectListByDeptNameAndDeptLeader(
            @Param("deptName") String deptName, @Param("deptLeaderName") String deptLeaderName, 
            @Param("pageNumber") Integer pageNumber,@Param("pageSize") Integer pageSize);

    List<SysDeptInfo> selectList();
    
    List<SysDeptZtreeInfo> selectListByZtree();

    SysDeptInfo selectLastByParentId(@Param("parentDeptId") Integer parentDept);

    String selectChildrenDeptByParentId(@Param("parentDeptId") Integer deptId);
}